<?php

namespace app\admin\controller\catalog;

use app\common\controller\Backend;

/**
 * 抓取記錄
 *
 * @icon fa fa-users
 */
class Crawl extends Backend
{

    /**
     * @var \app\common\model\Crawls
     */
    protected $model = null;
    protected $merchField = true;
    public function _initialize()
    {
        parent::_initialize();
        $this->model = model('Crawls');
    }

    public function add()
    {
        if ($this->request->isPost()) {
            $this->token();
        }
        return parent::add();
    }

    public function edit($ids = null)
    {
        if ($this->request->isPost()) {
            $this->token();
        }
        $row = $this->model->get($ids);
        if (!$row) {
            $this->error(__('No Results were found'));
        }
        return parent::edit($ids);
    }

}
